// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@use "refactor/common-refactor.scss" as deprecated;

.radio-btn-wrapper {
  @include deprecated.flexCenter;
  border-radius: deprecated.$br-8;
  height: deprecated.$s-32;
  background-color: var(--input-background-color);
  gap: deprecated.$s-4;
}

.radio-icon {
  --radio-icon-border-color: var(--radio-btn-border-color);

  @include deprecated.buttonStyle;
  @include deprecated.flexCenter;
  @include deprecated.focusRadio;
  height: deprecated.$s-32;
  flex-grow: 1;
  border-radius: deprecated.$s-8;
  box-sizing: border-box;
  border: deprecated.$br-2 solid var(--radio-icon-border-color);

  input {
    display: none;
  }
  svg {
    @extend .button-icon;
    stroke: var(--radio-btn-foreground-color);
  }
  .title-name {
    @include deprecated.uppercaseTitleTipography;
    color: var(--radio-btn-foreground-color);
  }
  &:hover {
    svg {
      stroke: var(--radio-btn-foreground-color-selected);
    }
  }
}

.checked {
  --radio-icon-border-color: var(--radio-btn-border-color-selected);

  background-color: var(--radio-btn-background-color-selected);
  svg {
    stroke: var(--radio-btn-foreground-color-selected);
  }
  .title-name {
    color: var(--radio-btn-foreground-color-selected);
  }
}

.disabled {
  cursor: default;
  background-color: transparent;
  border: deprecated.$s-2 solid transparent;
  svg {
    stroke: var(--button-foreground-color-disabled);
  }
  .title-name {
    color: var(--button-foreground-color-disabled);
  }
  &:hover {
    background-color: transparent;
    border: deprecated.$s-2 solid transparent;
    svg {
      stroke: var(--button-foreground-color-disabled);
    }
    .title-name {
      color: var(--button-foreground-color-disabled);
    }
  }
}
